<?php
$types = isset($types) ? $types : array();
?>
<div class="modal hide fade" id='edit-mall-modal'>
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
    <h3>编辑网站</h3>
  </div>
  <div class="modal-body">
    <form class="form-horizontal">
      <input type='hidden' name='id'/>
      <div class='msg'></div>
      <div class="control-group">
        <label class="control-label" for="cname">中文名</label>
        <div class="controls">
          <input type="text" name="cname" placeholder="" autocomplete="off" >
        </div>
      </div>

      <div class="control-group">
        <label class="control-label" for="ename">英文名</label>
        <div class="controls">
          <input type="text" name="ename" placeholder="" autocomplete="off" >
        </div>
      </div>

      <div class="control-group">
        <label class="control-label" for="url">URL</label>
        <div class="controls">
          <input type="text" name="url" placeholder="" autocomplete="off" >
        </div>
      </div>

      <div class="control-group">
        <label class="control-label" for="description">网站描述</label>
        <div class="controls">
          <textarea rows='3' name='description' class=""></textarea>
        </div>
      </div>

      <div class="control-group">
        <label class="control-label" for="type">网站类型</label>
        <div class="controls">
	  <select name='type_id'>
	    <option disabled>请选择</option>
            <?php foreach ($types as $t):?>
              <option value='<?php echo $t->id;?>'><?php echo $t->cname;?></option>
            <?php endforeach;?>
	</select>
        </div>
      </div>

      <div class="control-group">
        <label class="control-label" for="logo_url">LOGO</label>
        <div class="controls">
          <input type='hidden' name='logo_url' value=''/>
          <a class='btn upload-logo' style='float:left;'>上传</a>
          <div class='snap' style='height:60px;width:120px;float:left;margin-left:10px;'></div>
        </div>
      </div>

    </form>

  </div>
  <div class="modal-footer">
    <a href="javascript:void(0)" data-dismiss="modal" class="btn">关闭</a>
    <a href="javascript:void(0)" class="btn btn-primary save">保存</a>
  </div>
</div>
